import request from '@/utils/request'

// 查询物品列表
export function listList(query) {
  return request({
    url: '/school/goods/list',
    method: 'get',
    params: query
  })
}

// 查询物品详细
export function getList(id) {
  return request({
    url: '/school/goods/' + id,
    method: 'get'
  })
}

// 新增物品
export function addList(data) {
  return request({
    url: '/school/goods',
    method: 'post',
    data: data
  })
}

// 修改物品
export function updateList(data) {
  return request({
    url: '/school/goods',
    method: 'put',
    data: data
  })
}

// 删除物品
export function delList(id) {
  return request({
    url: '/school/goods/' + id,
    method: 'delete'
  })
}

// 导出物品
export function exportList(query) {
  return request({
    url: '/school/goods/export',
    method: 'get',
    params: query
  })
}

// 查询物品变更记录列表
export function listRecord(query) {
  return request({
    url: '/school/record/list',
    method: 'get',
    params: query
  })
}

// 查询物品变更记录详细
export function getRecord(id) {
  return request({
    url: '/school/record/' + id,
    method: 'get'
  })
}

// 新增物品变更记录
export function addRecord(data) {
  return request({
    url: '/school/record',
    method: 'post',
    data: data
  })
}

// 修改物品变更记录
export function updateRecord(data) {
  return request({
    url: '/school/record',
    method: 'put',
    data: data
  })
}

// 删除物品变更记录
export function delRecord(id) {
  return request({
    url: '/school/record/' + id,
    method: 'delete'
  })
}

// 导出物品变更记录
export function exportRecord(query) {
  return request({
    url: '/school/record/export',
    method: 'get',
    params: query
  })
}